﻿@{
    Layout = null;
    var data = ViewData["data"] as Pay.DTO.red_user_dto;



}
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>我的资产</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0,maximum-scale=1.0, user-scalable=no" />
    <link rel="stylesheet" href="~/Content/css/base.css" />
    <link rel="stylesheet" href="~/Content/css/tuoken.css" />
    <link href="~/Content/css/dropload.css" rel="stylesheet" />
    <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script type="text/javascript" src="~/Content/js/base.js"></script>
    <script src="~/Content/js/layer/1.9.3/layer.js"></script>
    <script src="~/Scripts/dropload.js"></script>
</head>
<style>
    .income_record .rg.rg-2 span {
        margin-bottom: 0.1rem;
        font-size: 0.28rem;
        color: #404951;
        display: block;
        line-height: normal;
        text-align: right;
    }

    .income_record .rg.rg-2 .time {
        font-size: 0.2rem;
        color: #A0A6AC;
        display: block;
    }
    .propertysum .rednum .rednumber {
        float: initial;
    }
    .propertysum .rednum .lf .dong {
        font-size: 0.24rem;
        color: #404951;
        float: right;
    }

    .horseinfo {
        font-style: inherit;
        font-size: 0.24rem;
    }
</style>
<body>
    <div class="header">
        <a href="javascript:history.go(-1);">
            <span class="back"></span>
        </a>
        <div class="hdtitle">
            我的资产
        </div>
    </div>
    <div class="bodyct">

        <div class="property">
            <div class="propertysum">
                <div class="rednum">
                    <div class="lf rednumber">
                        <label>目前拥有红钻数 <em class="dong">冻结中：@data.frozen_red_drill.ToString("f6")</em></label>
                        <em style="display: inline-block;">@data.present_red_drill</em>
                        <div class="rg" style="margin-top: 0.35rem;">
                            <a href="/home/red"><i class="ico"></i>红钻说明</a>
                        </div>
                    </div>

                   
                </div>
                <div class="redsum">
                    <span class="number">@data.red_drill</span>
                    <span class="suminfo">获得红钻总数</span>
                    <div class="solid"></div>
                </div>
                <div class="redsum">
                    <span class="number">@data.horse_power</span>
                    <span class="suminfo">当前马力值</span>
                </div>
            </div>
            <!-- 收支记录 -->
            <div class="income_record">
                <P>
                    <span id="record_title">收支记录</span>
                    <span style="float:right;margin-right:1%;" class="horse" id="switch_record">
                        <em class="horseinfo">马力记录>>></em>
                        <i></i>
                    </span>
                </P>
                <ul id="red"></ul>
                <ul id="horse_power"></ul>
            </div>

        </div>
    </div>
    <script type="text/javascript">
        $(function () {
            loadRecord(1, $("#red"));
            loadRecord(2, $("#horse_power"));
            $("#red").show();
            $("#horse_power").hide();
            $("#switch_record").click(function () {
                if ($("#record_title").text() == "收支记录") {
                    $("#record_title").text('马力记录');
                    $("#switch_record em").text('收支记录>>>');
                    $("#red").hide();
                    $("#horse_power").show();
                } else {
                    $("#record_title").text('收支记录');
                    $("#switch_record em").text('马力记录>>>');
                    $("#red").show();
                    $("#horse_power").hide();
                }

            })

        });
        //加载个人资产记录
        function loadRecord(type, el) {
            var query = { page: 1, size: 10, type: type };
            var dropload = el.dropload({
                scrollArea: window,
                loadDownFn: function (me) {

                    $.ajax({
                        url: '/User/_MyAsset', type: "post", data: query,
                        success: function (response) {
                            var paged = $(response).siblings("#page_" + type);
                            if (paged.length == 1) {
                                query.result += Number.parseInt(paged.attr("rows"));
                                el.append($(response));
                                el.find("#page_" + type).remove();
                                query.page++;
                            } else {
                                me.lock();
                                me.noData();
                            }
                            me.resetload();
                        },
                        error: function (xhr, type) {
                            me.lock();
                            me.noData();
                            me.resetload();
                        }
                    });
                }
            });
        }
    </script>

</body>



</html>